import Vue from 'vue';
import VueRouter from 'vue-router';
import Layout from '../views/layout/Layout.vue';
import Dashboard from '../views/dashboard/index.vue';
import Demo from '../views/demo/index.vue';
import NotFound from '../views/notFound/index.vue';

Vue.use(VueRouter);

const routes = [{
  path: '/',
  component: Layout,
  redirect: '/dashboard',
  children: [{
    path: 'dashboard',
    component: Dashboard,
  }, {
    path: 'demo',
    component: Demo,
  }, {
    path: 'notFound',
    component: NotFound,
  }],
}];


export default new VueRouter({
  routes,
});
